#include"udp_sever.hpp"
#include <memory>
#include <cstdlib>

void usage(std::string proc)
{
    std::cout << "\nUsage: " << proc << " port\n" << std::endl;
}


int main(int argc, char* argv[])
{
    if(argc != 3)
    {
        usage(argv[0]);
        exit(1);
    }
    uint16_t port = atoi(argv[2]);
    std::string ip = argv[1];
    std::unique_ptr<UdpSever> svr(new UdpSever(port, ip));
    svr->InitSever();
    svr->Start();
    return 0;
}